/**
 * 
 */
package com.furschina.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.annotations.Index;

/**
 * @author iday
 *
 */
@Entity
public class Topic extends BaseModel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9002492333434749358L;
	
	private String title;
	@Index(name = "idx_url")
	@Column(unique = true)
	private String url;	//url静态化或者重定向
	@Column(length = 10000)
	private String content;
	private Date started;	//发布时间
	private Date ended;	//结束时间
	private String keywords;	//SEO关键字
	@Column(length = 1000)
	private String description;	//SEO描述
	private String cover;	//封面
	private String template; // 使用模板

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url
	 *            the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}

	/**
	 * @param content
	 *            the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

	/**
	 * @return the started
	 */
	public Date getStarted() {
		return started;
	}

	/**
	 * @param started
	 *            the started to set
	 */
	public void setStarted(Date started) {
		this.started = started;
	}

	/**
	 * @return the ended
	 */
	public Date getEnded() {
		return ended;
	}

	/**
	 * @param ended
	 *            the ended to set
	 */
	public void setEnded(Date ended) {
		this.ended = ended;
	}

	/**
	 * @return the keywords
	 */
	public String getKeywords() {
		return keywords;
	}

	/**
	 * @param keywords
	 *            the keywords to set
	 */
	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the cover
	 */
	public String getCover() {
		return cover;
	}

	/**
	 * @param cover
	 *            the cover to set
	 */
	public void setCover(String cover) {
		this.cover = cover;
	}

	/**
	 * @return the template
	 */
	public String getTemplate() {
		return template;
	}

	/**
	 * @param template
	 *            the template to set
	 */
	public void setTemplate(String template) {
		this.template = template;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Topic [title=" + title + ", url=" + url + ", content="
				+ content + ", started=" + started + ", ended=" + ended
				+ ", keywords=" + keywords + ", description=" + description
				+ ", cover=" + cover + ", template=" + template + ", id=" + id
				+ "]";
	}

}
